home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************************
- *
- *
- * MacZoop - "the framework for the rest of us"
- *
- *
- *
- * ProjectSettings.h -- compiler flags and other settings specific to your
- * project. Copy this file and change things as you
- * need them. This file has the default settings.
- *
- *
- * © 1996, Graham Cox
- *
- *
- *
- *
- *************************************************************************************************/
-
-
- #pragma once
-
- #ifndef __PROJECTSETTINGS__
- #define __PROJECTSETTINGS__
-
- #define ON 1
- #define OFF 0
-
- //----------------------------------------------------------------------------------------------
-
- // ZApplication compilation options:
-
- // Every application should have a "signature"- a 32-bit number that is uniquely assigned to it.
- // Apple keep a register of application signatures to ensure they are unique. The signature is
- // declared as part of the 'BNDL' resource, if you have one. MacZoop will pick up this value
- // and assign it to <gAppSignature>. If you do not have a BNDL resource, or for backward
- // compatibility want to set the signature yourself, set the following to OFF: (default ON)
-
-
- #define USE_SIGNATURE_FROM_BNDL ON
-
-
- // if the above is OFF, you can set up your signature here.The default signature of this
- // application is 'ZAPP' (n.b. NOT registered with Apple!).
-
-
- #if USE_SIGNATURE_FROM_BNDL == OFF
- #define kApplicationSignature 'ZAPP'
- #else
-
- // you can automatically build the application's list of openable file types by looking at
- // the 'FREF' resources that it has. One of these will generally be 'APPL' or other executable
- // type which are NEVER added to the list, but other file types are if this is ON. This is only
- // available if USE_SIGNATURE_FROM_BNDL is also ON (Default: OFF):
-
- #define CHECK_FREF_RESOURCE_TYPES ON
- #endif
-
- //----------------------------------------------------------------------------------------------
-
- // to deal with low-memory crises, ZApplication allocates and manages a "shortage fund" which
- // it can release when the memory manager gets into trouble. BY default this is 64K, but you
- // can set it to whatever you want by setting this #define. This fund is designed to cope with
- // dire emergencies only- you may need to do more sophisticated memory management for complex
- // or memory-intensive applications.
-
-
- #define kShortageFundSize 65536 // leave 64K in reserve for emergencies.
-
-
- //----------------------------------------------------------------------------------------------
-
- // By default, MacZoop will work like a normal Mac application in that it will open a new
- // "untitled" window at startup if no files are passed to it. If you want to make a "faceless"
- // application, turn OFF the following define to suppress the opening of the initial window.
-
- // Default is ON
-
- #define MAKE_UNTITLED_STARTUP_WINDOW ON
-
-
- //----------------------------------------------------------------------------------------------
-
- // comment out the following if you do not want printing support
-
- // Default is ON
-
- #define PRINTING_ON ON
-
- // Printing options:
-
- // If you want to use a progress bar when printing ("Spooling page <n> of <y> pages") then set
- // this define to ON.
-
- // Default is OFF
-
- #define _PRINT_USING_PROGRESS_BAR OFF
-
-
- //----------------------------------------------------------------------------------------------
-
- // if you wish to use the Appearance Manager-savvy parts of MacZoop when running under
- // System 8, set the following to ON. If undefined, will implement standard System 7 behaviour.
- // If you compile with this defined, things should still work on previous system versions.
- // Note that if you are building an appearance aware app with MacZoop, you need to link with
- // the AppearanceLib library as well as define this.
-
- // Default is OFF
-
-
- #define APPEARANCE_MGR_AWARE OFF
-
-
-
- //----------------------------------------------------------------------------------------------
-
- // ZWindowManager compilation options:
-
- // HIG says that all floating windows are peers of one another and thus all show the active
- // state regardless of their ordering within their layer. Some programmers may prefer the
- // other common behaviour where only one floater is active at a time. To get this latter
- // behaviour, set the following define to OFF and recompile. n.b. windows will still receive
- // their activate/deactivate messages- this only affects the window hiliting.
-
- // Default is ON
-
- #define _ALL_FLOATERS_ACTIVE ON
-
- // this window manager does not allow activate events to be sent by the mac toolbox, but
- // instead calls the event handler directly with the relevant parameters. In most cases, your
- // code won't be aware of this, but if you really need to get a "real" activation event,
- // comment in the following define. This makes the window manager post a real activation event
- // instead of "faking" one.
-
- // Default is OFF
-
- #define _ACTIVATE_EVENTS_ARE_REAL OFF
-
- // When a window is picked up by its title bar for dragging, it is first brought to the front
- // of its layer (unless the command key is down). This selection can result in a non-updated
- // area of the window appearing until the drag is completed, at which point the window is
- // refreshed. This is the normal behaviour. However, this window manager object can prevent
- // this by forcing the update to occur immediately. This may give better perceived performance,
- // since the user won't be waiting for the update to come along later. To get this behaviour,
- // comment in the following:
-
- // Default is ON
-
- #define _UPDATE_ON_SELECT ON
-
- // Similarly, in the same situation, we select the window before dragging it. This is not what
- // DragWindow does- it selects the window after dragging. If you really desire this behaviour
- // instead, comment in the following:
-
- // Default is OFF
-
- #define _DRAGWINDOW_COMPATIBLE OFF
-
- // If you are taking advantage of the automatic support for a "Windows" menu, you might want to
- // list the windows alphabetically. The default is to list them in order of creation. To list
- // alphabetically, turn ON the following:
-
- // Default is OFF
-
- #define _ALPHABETICAL_WINDOWS_MENU OFF
-
- // if you'd like windows that have an associated file to popup a directory menu when their
- // titles are command-clicked, set this to ON. A menu choice opens the relevant directory
- // window in the Finder. The code required to implement this is available separately-
- // called "DirectoryPopup" © by Marco Piovanelli. A version of this code is available in the
- // More Classes:Goodies & Extras:DirectoryPopup folder.
-
- // Default is OFF
-
- #define _USE_DIR_POPUP OFF
-
-
- //----------------------------------------------------------------------------------------------
-
- // ZMenuBar & ZEventHandler compilation options:
-
- // comment IN for automatic mouse-aware menubar hiding (implemented in ZEventHandler)
-
- // Default is OFF
-
- #define _AUTO_MBAR_HIDING OFF
-
-
- //----------------------------------------------------------------------------------------------
-
- // ZFile compilation options:
-
- // ZFile has methods for automatically building custom icons for a file. This support requires
- // that you have "PixmapUtils.cpp" in your project, which adds some overhead. If you don't
- // need this support, turn off following which will make things smaller.
-
- // Default is ON
-
- #define _CUSTOM_ICON_SUPPORT ON
-
- //----------------------------------------------------------------------------------------------
-
- // Zoom rect effect options:
-
- // if you have the drag manager, and your app links to DragLib, and this define is ON, then
- // every window you open will have a finder-like "zoom" rect effect. The source of this rect
- // is set by SetLocalZoomSource or SetGlobalZoomSource in ZWindowManager.h. This is automatically
- // set by menu items, dialog button clicks, etc. You only need to deal with this if you have
- // an interface element that spawns a window that is not a menu or a button.
-
- // Default is ON
-
- #define _ZOOM_RECT_FX ON
-
- //----------------------------------------------------------------------------------------------
-
- // Window save/restore features:
-
- // MacZoop can save and restore your window positions by storing a 'Wpos' resource for a window
- // in a nominated resource file (including prefs). Your code has to make the calls for your own
- // document windows, but some automatic features are also provided, especially for dialogs.
- // These flags control the implementation.
-
- // enables the code in general- your project will require at least ZResourceFile and ZPrefsFile
- // if ON. The basic code is implemented in ZWindowManager, with a simpler API in ZWindow.
-
- #define _WPOS_WINDOW_PLACEMENT ON
-
- // enable automatic save/restore for dialogs and floaters:
-
- #if _WPOS_WINDOW_PLACEMENT
- #define _AUTO_WPOS_FOR_DIALOGS ON
- #define _AUTO_WPOS_FOR_FLOATERS ON
- #endif
-
- //----------------------------------------------------------------------------------------------
-
- // progress dialog options:
-
- // if OFF, your code needs to check for a cancel of the progress dialog by checking the return
- // value of InformProgress(). If ON, the dialog itself throws a cancel exception making it
- // even easier to use- however, you may need an exception handler to clean up properly.
-
- // Default is ON
-
- #define _CANCEL_PROGRESS_THROWS_EXCEPTION ON
-
- //----------------------------------------------------------------------------------------------
-
- // Navigation Services options:
-
- // MacOS 7.5.5 and later can use the new Apple Navigation Services instead of StandardFile to
- // choose files for opening, saving, etc. This interface is extremely groovy and will be the
- // only one supported under Mac OSX. MacZoop can use this right now if you have it installed. If
- // you desperately want the old interfaces, turn this option OFF (default is ON). Note that
- // you'll get the old interfaces anyway if Navigation is not installed or your system is too
- // old. n.b. if ON, you need to add NavigationLib to your project.
-
- // Default is ON
-
- #define _USE_NAVIGATION_SERVICES ON
-
- // Navigation services provides some standard alerts for Save Changes and Revert. At present,
- // these are slightly buggy in that they don't position very well over floating windows, and
- // in any case the MacZoop ones look nicer. This this additional setting allows you to choose
- // which ones to use. Note that using the MacZoop ones does NOT affect Carbon compatibility.
-
- #if _USE_NAVIGATION_SERVICES
- #define _USE_NAV_SAVEREVERT_ALERTS OFF
- #endif
-
- #endif